/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-09-21
 * Time: 20:24
 */
public class Test {
    public boolean isEmpty(){
        return usedSize == 0;
    }

    public int peek(){
        if(isEmpty()){
            return -1;
        }
        return elem[0];
    }

    public void heapSort(){
        int end = usedSize-1;
        while(end > 0){
            swap(elem,0,end);
            shifDown(0,end);
            end--;
        }
    }

}
}
